home *** CD-ROM | disk | FTP | other *** search
- /*
- This file contains function prototypes and structure definitions
- to support undo and redo actions for a single text editor (window).
-
-
- This file is for POV-Ray 3.0.1!
- The POV-Ray-Team is allowed to use this source code as they like
- to use it.
-
- Created by Thorsten Froehlich, 1997.
-
- See UndoRedoSystem.c for more information!
- */
-
- #ifndef __UndoRedoSystem__
- #define __UndoRedoSystem__
-
- #include <Types.h>
-
-
- typedef struct
- {
- long selStart;
- long selEnd;
- Handle text;
- Boolean mergeable;
- char command[20];
- } My_UndoBuffer_Typedef;
-
- typedef My_UndoBuffer_Typedef My_RedoBuffer_Typedef;
-
-
- /* Set the maximum undo / redo buffer size here */
-
- #define kMaxUndoRedo 40
-
-
- extern int gUndoBufferCount;
- extern Boolean gUndoMaking;
-
- extern int gRedoBufferCount;
- extern Boolean gRedoMaking;
-
- void Init_UndoRedoSystem(void);
- void Dispose_UndoRedoSystem(void);
-
- Boolean Check_CanUndo(void);
- Boolean Check_CanUndo(void);
- void Get_UndoCommand(char *str);
- void Get_RedoCommand(char *str);
-
- void Begin_UndoRedo_Monitoring(void);
- void End_UndoRedo_Monitoring(Boolean change_undo,Boolean change_redo);
-
- Boolean Begin_Make_Undoable(char *command,Boolean merge);
- Boolean End_Make_Undoable(void);
-
- Boolean Begin_Make_Redoable(char *command,Boolean merge);
- Boolean End_Make_Redoable(void);
-
- void Clear_UndoBuffer(void);
- void Clear_RedoBuffer(void);
-
- Boolean My_DoUndo(void);
- Boolean My_DoRedo(void);
-
- #endif
-